package com.baizhi.app;

import com.baizhi.entity.R;
import com.baizhi.service.BannerService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Slf4j
@RestController
@RequestMapping("/appBanner")
public class AppBannerController {
    @Autowired
    private BannerService bannerService;
    @GetMapping("/selectBanner/{size}")
    public R selectBanner(@PathVariable("size") @RequestParam(defaultValue = "5") Integer size){
        R r = bannerService.selectBanner(size);
        return r;
    }


}
